package clientServlets;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import controller.Controller;

public class AddVoteClient extends HttpServlet{
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		int orderID = Integer.parseInt(req.getParameter("orderNum"));
		String userNameBiz = req.getParameter("biz");
		int vote = Integer.parseInt(req.getParameter("vote"));
		System.out.println("addVote Servlet "+orderID+" "+userNameBiz+" "+vote);
		Controller.getInstance().addVote(userNameBiz, orderID, vote);
	}
}
